import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { RoleQuery, RolePageResult, RoleForm } from './types';

/**
 * 修改
 *
 * @param data
 */
export function updateServer(data: any) {
  return request({
    url: '/api/app/server/serverupdate',
    method: 'post',
    data
  });
}

/**
 * 添加
 *
 * @param data
 */
export function addServer(data: any) {
  return request({
    url: '/api/app/server/serveradd',
    method: 'post',
    data
  });
}


/**
 * 获取List
 *
 * @param data
 */
export function getServerList(data: any) {
  return request({
    url: '/api/app/server/serverlist',
    method: 'post',
    data
  });
}

/**
 * 删除List
 *
 * @param data
 */
export function deleteServer(data: any) {
  return request({
    url: '/api/app/server/serverbatchdelete',
    method: 'post',
    data
  });
}

/**
 * 查询普通设备
 *
 * @param data
 */
export function getServerByid(data: any) {
  return request({
    url: '/api/app/server/serverbyid',
    method: 'post',
    data
  });
}

/**
 * 一键关闭
 *
 * @param data
 */
export function closeLibraryOneClick(data: any) {
  return request({
    url: '/api/app/server/closeLibraryOneClick',
    method: 'post',
    data
  });
}
/**
 * 脑电控制功能状态更新
 *
 * @param data
 */
export function eggControlStatusUpdate(data: any) {
  return request({
    url: '/api/app/server/eegControlStatusUpdate',
    method: 'post',
    data
  });
}
/**
 * 一键开馆
 *
 * @param data
 */
export function openLibraryOneClick(data: any) {
  return request({
    url: '/api/app/server/openLibraryOneClick',
    method: 'post',
    data
  });
}
/**
 * 语音功能状态更新
 *
 * @param data
 */
export function updateVoiceStatus(data: any) {
  return request({
    url: '/api/app/server/voiceStatusUpdate',
    method: 'post',
    data
  });
}
/**
 * 语音功能状态查询
 *
 * @param data
 */
export function voiceStatusFind(data: any) {
  return request({
    url: '/api/app/server/voiceStatusFind',
    method: 'post',
    data
  });
}
/**
 * 语音功能状态查询
 *
 * @param data
 */
export function eggControlStatusFind(data: any) {
  return request({
    url: '/api/app/server/eegControlStatusFind',
    method: 'post',
    data
  });
}

/**
 * 服务器设备开关
 *
 * @param data
 */
export function powerStatusUpdate(data: any) {
  return request({
    url: '/api/app/server/power/status',
    method: 'post',
    data
  });
}

